import prompt from "@system.prompt";
import router from "@system.router";

export default {
    data: {
        title: "World",
        array: [
            {
                id: "01",
                tit: "账号绑定",
                numb: "张三",
            },
            {
                id: "02",
                tit: "手机号码",
                numb: "12345678910",
            },
            {
                id: "03",
                tit: "登录密码",
                numb: "修改",
            },
        ],
    },

    back() {
        router.push({
            uri: "pages/personal/personal",
        });
    },

    logout() {
        this.$element("confirmDialog").show();
    },

    change(e) {
        var $id = e.target.dataSet.id;
        console.log($id);
        if ("01" == $id) {
            router.push({
                uri: "pages/person_pim/per_pim_banding/per_pim_banding",
            });
        }
        if ("02" == $id) {
            router.push({
                uri: "pages/person_pim/per_pim_numb/per_pim_numb",
            });
        }
        if ("03" == $id) {
            prompt.showToast({
                message: "不会写哈哈哈",
            });
        }
    },

    cancelClick(id) {
        router.push({
            uri: "pages/login_main/login",
        });
    },
    confirmClick(id) {
        this.$element(id).close();
    },
};
